package com.phone.entity;

import com.phone.json.JsonUser;

/**
 * Created by tisen on 2017/8/21.
 */
public class User2 implements JsonEntity<JsonUser>{
    private String id;      //唯一id
    private String nickname;//昵称
    private String avatar;  //头像
    private String code;    //邀请码
    private int point;      //积分点数
    private float money;    //金钱
    private int round;      //抽奖次数
    private Account account;

    public User2() {
    }

    public User2(String id, String nickname, String avatar, String code, int point, float money, int round) {
        this.id = id;
        this.nickname = nickname;
        this.avatar = avatar;
        this.code = code;
        this.point = point;
        this.money = money;
        this.round = round;
    }


    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }


    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getPoint() {
        return point;
    }

    public void setPoint(int point) {
        this.point = point;
    }

    public float getMoney() {
        return money;
    }

    public void setMoney(float money) {
        this.money = money;
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        this.round = round;
    }



    @Override
    public String toString() {
        return "User2{" +
                "id='" + id + '\'' +
                ", nickname='" + nickname + '\'' +
                ", avatar='" + avatar + '\'' +
                ", code='" + code + '\'' +
                ", point=" + point +
                ", money=" + money +
                ", round=" + round +
                '}';
    }

    @Override
    public JsonUser toJson() {
        return new JsonUser(this);
    }
}
